﻿/* PN264 - A Parallel H.264 Encoding Utility
 * Copyright © 2009 PN264 Development Team
 *
 * This software is released the terms and conditions of the MIT License,
 * a copy of which can be found in the License.txt file.
 *
 * Contributors:
 * Will 'AnarkiNet' Shelley (AnarkiNet@gmail.com)
 */
using System;

namespace PN264.Controls
{
    /// <summary>
    /// Represents event data for the <see cref="JobList.SelectedJobChanged"/>
    /// event.
    /// </summary>
    public sealed class SelectedJobChangedEventArgs : EventArgs
    {
        #region Constructors
        /// <summary>
        /// Initializes a new instance of the
        /// <see cref="SelectedJobChangedEventArgs"/> class.
        /// </summary>
        /// <param name="newJob">The new <see cref="Job"/>.</param>
        public SelectedJobChangedEventArgs(Job newJob)
        {
            this.newJob = newJob;
            this.oldJob = null;
        }
        /// <summary>
        /// Initializes a new instance of the
        /// <see cref="SelectedJobChangedEventArgs"/> class.
        /// </summary>
        /// <param name="newJob">The new <see cref="Job"/>.</param>
        /// <param name="oldJob">The old <see cref="Job"/>.</param>
        public SelectedJobChangedEventArgs(Job newJob, Job oldJob)
        {
            this.newJob = newJob;
            this.oldJob = oldJob;
        }
        #endregion
        #region Fields
        private readonly Job newJob;
        private readonly Job oldJob;
        #endregion
        #region Properties
        /// <summary>
        /// Gets the new <see cref="Job"/>.
        /// </summary>
        public Job NewJob
        {
            get
            {
                return this.newJob;
            }
        }
        /// <summary>
        /// Gets the old <see cref="Job"/>.
        /// </summary>
        public Job OldJob
        {
            get
            {
                return this.oldJob;
            }
        }
        #endregion
    }
}
